<template>
    <div>
        <button>返回</button>
        <!-- <span>{{ navTitle }}</span> -->

        <!-- 调用app中的navTitle -->
        <span>{{ app.navTitle }}</span>     
        <button>首页</button>
    </div>
</template>

<script>
export default {
    data(){
        return {
            
        }
    },

    inject:['navTitle','app']     //app.vue中provide注入的数据可以通过inject获取
}
</script>

<style scoped>
    div{
        display: flex;
        width: 100%;
        height: 50px;
        justify-content: space-between;
        align-items: center;
        background-color: skyblue;
    }
</style>